{% extends "base_dialog.html" %}

{% block content %}
    {% if question %}
        <div class="tip">Задача:</div>
        <div class="quest">{{ question.text|linebreaksbr }}</div><br>
    {% endif %}
    <h2 style="margin-top: 0px;margin-bottom: 14px;">Выберите наиболее правильный ответ</h2>
    <form action="/quest?id={{ question.key }}&rnd={{ rnd }}" method="post">
        {% for answer in answers %}


            <div class="state">
                <input type="submit"
                       name="vote"
                       value="{{forloop.counter}}"
                       data-icon="check"
                       data-inline="true"> {{ answer.text|linebreaksbr }}
            </div>
            <!-- This is invisible storage for answer key to POST it -->
            <input type="hidden" name="{{forloop.counter}}" value="{{ answer.key }}">
            <br>
        {% endfor %}
    </form>
{% endblock %}